package com.system.controller;

import java.util.List;

import javax.annotation.Resource;

import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

import com.common.base.persistence.Page;
import com.common.web.resp.vo.ResponseInfo;
import com.system.service.ISysLoginLogService;
import com.system.vo.SysLoginLogVO;

/**
 * 系统登录入职Controller
 * @author iuie
 * @date 20170809
 */
@RequestMapping("sys/logMgr")
@Controller
public class SysLoginLogController {

	@Resource
	private ISysLoginLogService loginLogService;
	
	@RequestMapping
	public String index() {
		return "view-system/log/log";
	}
	
	/**
	 * 分页查询
	 * @param page
	 * @param log
	 * @return
	 */
	@RequestMapping("findAll")
	@ResponseBody
	public ResponseInfo findAll(Page<SysLoginLogVO> page, SysLoginLogVO log) {
		List<SysLoginLogVO> list = loginLogService.findByPage(page, log);
		return ResponseInfo.successInfo(list, page);
	}
	
}
